﻿using Memo.Electricity.Engine;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

namespace Memo.Electricity.Game
{
	public class CGravel : CBaseOrderBlock
	{


#if UNITY_EDITOR
		public override void Init()
		{
			base.Init();
			var e = GetComponent<Explodable>();
			e.fragmentInEditor();
			EditorUtility.SetDirty(e);
		}
#endif

		public void Disabled()
		{
			GetComponent<Explodable>().explode();
			Destroy(gameObject, 10.0f);
			//StartCoroutine(DisableCoroutine());
		}

		private IEnumerator DisableCoroutine()
		{
			yield return null;	//这里开一个动画
			gameObject.SetActive(false);
		}


	}
}



